package com.cbgolf.oa.presenter;

import com.cbgolf.oa.contract.ITeetimeContract;
import com.cbgolf.oa.entity.TeeTimeBean.TeeTimesBean;
import com.cbgolf.oa.model.TeetimeModelImpl;

/**
 * Author: lq
 * Created on 2018/6/4
 * @author lq
 */
public class TeetimePresenterImpl implements ITeetimeContract.Presenter {

  private ITeetimeContract.Model model;
  private ITeetimeContract.IView view;

  @Override
  public void init(ITeetimeContract.IView view) {
    this.view = view;
    model = new TeetimeModelImpl();
  }

  @Override
  public void unInit() {

  }

  @Override
  public void requestAbCode() {
    view.showProgress();
    model.requestAbCode();
  }

  @Override
  public void requestTeetime(long time, String abCode) {
    view.showProgress();
    model.requestTeetime(time, abCode);
  }

  @Override
  public void addPerson(TeeTimesBean bean) {
    view.showProgress();
    model.addPerson(bean);
  }

  @Override
  public void reducePerson(TeeTimesBean bean) {
    model.reducePerson(bean);
  }


}